/*
 * @Description:
 * @Autor: zhzj
 * @Date: 2020-12-21 14:58:14
 * @LastEditors: zhzj
 * @LastEditTime: 2020-12-21 14:58:14
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// get请求
export const detailInfo = params => axios.get(`${SERVER.CMSCLOUD_WMS}/equity/tram/order`, { params });


//get请求
export const detailMessage = orderId => axios.get(`${SERVER.CMSCLOUD_WMS}/equity/tram/getPocess/${orderId}`);

// 获取表格数据
export const getList = params => axios.get(`${SERVER.CMSCLOUD_WMS}/equity/tram/order`, { params });



// 获取备件退货明细数据
export const getPartsGroup = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/rtGoods/getpartsbyid`, { params });

// 获取索賠配件数据
export const excelOutPut = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/rtGoods/export`, { params });

// 保存审批
export const postApprove = (params) => axios.post(`${SERVER.CMSCLOUD_WMS}/part/rtGoods/saveapprove`, params)


// 获取审批历史
export const getApproveRecord = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/approverecord/getapproverecordbydjid`, { params });


// / 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);


  //搜索经销商
export const byAllInfo = params => axios.get(`${SERVER.CMSCLOUD_CHANNEL}/message/dealerAttach/dealerInfo/byAllInfo`, { params });


// 查询事业部
export const getOrgList = params => axios.get(`${SERVER.SYSMANAGE}/org/getBusinessOrg`, { params });

//导出
export const getClaimListForExport = params => {
  params = Object.assign(params, { menuId: '-1' });
  return axios({
    url: `${SERVER.CMSCLOUD_WMS}/equity/tram/export`,
    method: 'get',
    params: params,
    responseType: 'blob'
  });
};

